package com.example.unimap;

import java.io.File;
import java.io.IOException;
import java.util.LinkedList;

import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;

import org.xml.sax.SAXException;

public class Building {
	//Read information from file and fill Graphic and Logic fields
	public Building()
	{
		logicModel = new Logic(fillGraph());
		graphicModel = new Graphic();
	};
	
	public String[] names;
	
	//fill logicModel.graph from file
	private int[][] fillGraph()
	{
		try {
			SAXParserFactory factory = SAXParserFactory.newInstance(); 
			SAXParser parser = factory.newSAXParser();
			mySAXParser saxp = new mySAXParser(); 
			parser.parse(new File("9.xml"), saxp); 
		} catch (ParserConfigurationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (SAXException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null; 
	}
	
	public void Draw()
	{
		return;
	};
	
	public LinkedList<Element[]> SearchPath(){
		return new LinkedList<Element[]>();
	};
	
	public Graphic graphicModel;
	public Logic logicModel;
}
